<!DOCTYPE html>
<html lang="en">
<head>
    <title>老版本VUE示例</title>
</head>
<body>
    <div id="app">
        <button @click="sub">-</button>
        <span>{{count}}</span>
        
        <button @click="add">+</button>

    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var vue = new Vue({
            el:"#app",
            data:{
                count:1
            },
            methods:{
                add:function(){
                    this.count++;
                },
                sub:function(){
                    this.count--;
                }
            }
            
        })
    </script>
</body>
</html>